import request from '@/utils/request'

export function findAllPowerConfig(data) {
  return request({
    url: '/power/api/findAllPowerConfig',
    method: 'post',
    data
  })
}

export function getPowerChannelsInfo(data) {
  return request({
    url: '/power/api/getPowerChannelInfo',
    method: 'post',
    data
  })
}

export function updatePowerConfig(data) {
  return request({
    url: '/power/api/updatePowerConfig',
    method: 'put',
    data
  })
}

export function addPowerConfig(data) {
  return request({
    url: '/power/api/addPowerConfig',
    method: 'post',
    data
  })
}

export function getTribunalsHasPowers(data) {
  return request({
    url: '/power/api/getTribunalsHasPowers',
    method: 'post',
    data
  })
}

export function savePowerChannelInfo(data) {
  return request({
    url: '/power/api/savePowerChannelInfo',
    method: 'post',
    data
  })
}

export function getPowerChannelStatusByPowerId(data) {
  return request({
    url: '/power/api/getChannelStatusByPowerId',
    method: 'post',
    data
  })
}

export function setPowerChannelStatusByPowerId(data) {
  return request({
    url: '/power/api/setPowerChannelStatusByPowerId',
    method: 'post',
    data
  })
}

export function setAllPowerChannelStatusByPowerId(data) {
  return request({
    url: '/power/api/setAllPowerChannelStatusByPowerId',
    method: 'post',
    data
  })
}

export function sendPowerMessage(data) {
  return request({
    url: '/power/api/sendPowerMessage',
    method: 'post',
    data
  })
}

export function sendGroupPowerMessage(data) {
  return request({
    url: '/power/api/sendGroupPowerMessage',
    method: 'post',
    data
  })
}

export function getPowerDeviceStatus(data) {
  return request({
    url: '/power/api/getDeviceStatus',
    method: 'post',
    data
  })
}
